def math_stuff(first_number, second_number)

operation = (1..4).to_a.sample
	first_number = first_number.to_f
	
	case operation
	when 1
		answer =  first_number + second_number
		operator_used = "Addition"
	when 2
		answer =  first_number - second_number
		operator_used = "Subtraction"
	when 3
		answer =  first_number * second_number
		operator_used = "Multiplication"
	when 4
		answer =  first_number / second_number
		operator_used = "Division"
	end

"The answer is #{answer}. \n\t Operation used is #{operator_used} "

end

puts math_stuff(20, 7)

def math_stuff_user()

	puts "Enter the first number"
	first_number = gets.chomp.to_f
	puts "Enter the second number"
	second_number = gets.chomp.to_f

	operation = (1..4).to_a.sample

	case operation
	when 1
		answer =  first_number + second_number
		operator_used = "Addition"
	when 2
		answer =  first_number - second_number
		operator_used = "Subtraction"
	when 3
		answer =  first_number * second_number
		operator_used = "Multiplication"
	when 4
		answer =  first_number / second_number
		operator_used = "Division"
	end

"The answer is #{answer}. \n\t Operation used is #{operator_used} "


end

puts math_stuff_user()


